const _ = require('lodash')
const { log } = console
const reverse = (arr) => arr.reverse()
const first = (arr) => arr[0]
const toUpper = (s) => s.toUpperCase()
// 数组中的最后一个元素获取到并大写
const f = _.flowRight(toUpper, first, reverse)
// k可以接受多个参数 (原来只能两个)
log(f(['one', 'two', 'three'])) //THREE
